package oa.hleast.xswl.service.pay;

public interface WeiXinPayClientService {

    /**
     * 微信统一下单
     * https://pay.weixin.qq.com/wiki/doc/api/jsapi_sl.php?chapter=9_1
     *
     * @param openId      支付方openId
     * @param sysTradeNo  系统订单号
     * @param subAppId    子商家
     * @param subMchId    微信支付分配的子商户号
     * @param orderTotal  订单总金额,单位分
     * @param description 描述
     * @param attach      自定义参数
     * @return 示例如下:
     * {"id":"eef91ff8-7f2d-5b0e-b6b6-5f507d2b7eb6","create_time":"2021-10-21T17:00:19+08:00","resource_type":"encrypt-resource","event_type":"TRANSACTION.SUCCESS","summary":"支付成功","resource":{"original_type":"transaction","algorithm":"AEAD_AES_256_GCM","ciphertext":"ixoa7LZjojqvtmXdG33NdiK89se7dJXnOt7K2au2eDUnHelaEQ1oPgb8GvqDg2tAs+YbFxfqMbRAJSna4xOyrMRfLkzvHL6daAyo+RI00pcki5SMrFs6tVP1FqFmFvJJHxrUa/qqWJkdAonB3/3pA/YiOt/1i7fN3qKK+LCN2Nd6EXW3Cv/ZiybIVlBt6Y5YRR3DDYmDyi5si0D6Opdyh0nHGvpooolZzLrEjSj0OkbRMqR+jjDjz0FIY8fv3Do/mVZ6JzoE5E+3l5t7CvDtDfe/e6NAOM9SgSG9VFDJbpdLOIdLg2joMJ+S9YswwYGx+5hh6kL2nB/828fN3WOKOscB6NMPfdP+3Tts5K8Oxhq7HfpJmkpEw75lGgul+b+FZXTBjkxhHh+BI4Vk1WT6zbzwZzaP6xFB2ZowUfqguXOpmx0q6ynkduicecIGvVVJTOcef6WmozuCVMDTWjQexMFxqqGWweOYl6oGHAUFXoGtmFCF4Zqk5yGu66688ArtM/hQ4GwW2pSM4nZRKndGgf7L+f3zZY0GgF/pgbDHnJMvdMzCdxA+lxmD/XWh0vEySjWXJb3Pl2pY5gsyhZu7sg//8Ng7rBqe7Yv94ADdcyffLSNBCDVpKIFweSYHmM9iv0gJ51/N7kOA5Lm0SOnd75weXXXxcve74ymXMGxJmDRuAyjYzLcxYn2qUocIZ+54FX7ix9SvhQBTxws8IRFIH2y2YNn9Q82Sh+2J6ymdDMmevubL0/G1pbaXUJejPBl4g723","associated_data":"transaction","nonce":"Ucqb6wWHDaRE"}},currentTime = 1634806819979
     */
    String jsApiPay(String openId, String sysTradeNo, String subAppId, String subMchId, Integer orderTotal, String description, String attach);

    String jsApiPay(String openId);

    Boolean refund(String transactionId, String outTradeNo, String outRefundNo, Integer refund, Integer total, String reason);
}
